/************** Zhihui *****************/

#pragma once
#include <random>
#include<map>
#include <chrono>
#include <unordered_map>
#include "RegionCalculator.h"
#include "contest_dm.h"
#include "./Third/Flute3-Cpp-Wrapper/Flute3Wrapper.hpp"

namespace ieda_contest {

class ContestDataManager;

class Move {
    std::default_random_engine Random;

public:
    // 构造函数
    Move(ContestDataManager* data_manager){
        Random.seed(7122);
        _data_manager = data_manager;
    }
    ~Move() = default;

    bool addCell(idb::IdbInstance *CellInst, int Row, int Col);

    void removeCell(idb::IdbInstance *CellInst);

    std::pair<long long, bool> add_and_route(idb::IdbInstance *CellPtr, int Row, int Col, bool virtual_route);
  
    void move(RegionCalculator &RC, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > > startTime);
    
    // 其他可能的方法...

private:
    ContestDataManager* _data_manager = nullptr;  // 指向 DataManager 实例的指针

};
} // namespace ieda_contest